#coding=utf-8
a=[1,5,21,30,15,9,30,24]
all=0
for i in a:
    if i%5==0:
        all=all+i
print(all)